// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IStrategyExpoCell.cs" company="Open Trader">
//   Copyright (c) David Denis (david.denis@systemathics.com)
// </copyright>
// <summary>
//   Exposition cell for a strategy
// </summary>
// --------------------------------------------------------------------------------------------------------------------

#region

using System;
using Org.OpenTrader.Framework.Forge.Enums;

#endregion

namespace Org.OpenTrader.Framework.Forge.Interfaces
{
    /// <summary>
    /// Exposition cell for a strategy
    /// </summary>
    public interface IStrategyExpoCell : IExpoCell
    {
        #region Properties

        /// <summary>
        /// Type of the expo
        /// </summary>
        EExpoCellType ExpoCellType { get; }

        /// <summary>
        /// Gets Fees.
        /// </summary>
        double Fees { get; }

        /// <summary>
        /// TRUE if NominalLong > NominalShort
        /// </summary>
        bool IsLong { get; }

        /// <summary>
        /// TRUE if NominalShort > NominalLong  
        /// </summary>
        bool IsShort { get; }

        /// <summary>
        /// TRUE if NominalExpo not null 
        /// </summary>
        bool IsOpen { get; }

        /// <summary>
        /// TRUE if NominalExpo is null 
        /// </summary>
        bool IsClosed { get; }
        
        /// <summary>
        /// Gets NetPL.
        /// </summary>
        double NetPL { get; }

        /// <summary>
        /// Return the market expo : Long - Short
        /// </summary>
        double NominalExpo { get; }

        /// <summary>
        /// Gets NominalLong.
        /// </summary>
        double NominalLong { get; }

        /// <summary>
        /// Gets NominalShort.
        /// </summary>
        double NominalShort { get; }

        /// <summary>
        /// Gets PL.
        /// </summary>
        double PL { get; }

        /// <summary>
        /// Gets Realized.
        /// </summary>
        double Realized { get; }

        /// <summary>
        /// Gets UnRealized.
        /// </summary>
        double UnRealized { get; }

        #endregion

        #region Indexers

        /// <summary>
        /// Get InstrumentExpoCell using index
        /// </summary>
        /// <param name="index"></param>
        /// <returns></returns>
        IInstrumentExpoCell this[int index] { get; }

        /// <summary>
        /// Check if the values are changed
        /// </summary>
        bool IsChanged { get; }

        /// <summary>
        /// Check if updated
        /// </summary>
        bool IsUpdated { get; }

        /// <summary>
        /// Check if is updating values
        /// </summary>
        bool IsUpdating { get; }

        /// <summary>
        /// LastUpdate Time
        /// </summary>
        DateTime LastUpdate { get; }

        #endregion
    }
}